package proInstMgrModule.Component;

import java.util.ArrayList;

import edu.ccut.saturn.component.DefaultComponent;
import edu.ccut.saturn.component.IParameterContext;

public class SplitProInstId extends DefaultComponent {
	@Override
	public void execute(IParameterContext parameterContext) throws Exception {
		String proInstIds = (String)parameterContext.getParameterValue(0);
		ArrayList<String> proInstIdList = null;
	
		if(proInstIds!=null&&!"".equals(proInstIds)){
			proInstIdList = new ArrayList<String>();
			String[] ids = proInstIds.split(",");
			for(int i = 0; i < ids.length; i++){
				proInstIdList.add(ids[i]);
			}
		}
		
		parameterContext.setParameter(1, proInstIdList);
	}
}